<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .square{
            position: relative;
            width: 100px;
            height: 100px;
            margin: 50px auto;
            background-color: gold;
        }
        .circle{
            position: absolute;
            right: -14px;
            top: -14px;
            text-align: center;
            line-height: 28x;
            color: #fff;
            width: 28px;
            height: 28px;
            background-color: red;
            border-radius: 50%;
        }
    </style>
</head>
<body>
    <div class="square">
        <div class="circle">5</div>
    </div>
</body>
</html>